3.10.68 \(\int (a+b x)^2 (a^2-b^2 x^2)^p \, dx\) [968]

Optimal. Leaf size=60 \[ \frac {(a+b x)^2 \left (a^2-b^2 x^2\right )^{1+p} \, _2F_1\left (1,2 (2+p);4+p;\frac {a+b x}{2 a}\right )}{2 a b (3+p)} \]

[Out]

1/2*(b*x+a)^2*(-b^2*x^2+a^2)^(1+p)*hypergeom([1, 4+2*p],[4+p],1/2*(b*x+a)/a)/a/b/(3+p)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 71, normalized size of antiderivative = 1.18, number of steps used = 2, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {692, 71} \begin {gather*} -\frac {a 2^{p+2} \left (\frac {b x}{a}+1\right )^{-p-1} \left (a^2-b^2 x^2\right )^{p+1} \, _2F_1\left (-p-2,p+1;p+2;\frac {a-b x}{2 a}\right )}{b (p+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^2*(a^2 - b^2*x^2)^p,x]

[Out]

-((2^(2 + p)*a*(1 + (b*x)/a)^(-1 - p)*(a^2 - b^2*x^2)^(1 + p)*Hypergeometric2F1[-2 - p, 1 + p, 2 + p, (a - b*x
)/(2*a)])/(b*(1 + p)))

Rule 71

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c
 - a*d))^n))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-d/(b*c - a*d), 0]))

Rule 692

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[d^(m - 1)*((a + c*x^2)^(p + 1)/((1
+ e*(x/d))^(p + 1)*(a/d + (c*x)/e)^(p + 1))), Int[(1 + e*(x/d))^(m + p)*(a/d + (c/e)*x)^p, x], x] /; FreeQ[{a,
 c, d, e, m}, x] && EqQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[p] && (IntegerQ[m] || GtQ[d, 0]) &&  !(IGtQ[m, 0] && (
IntegerQ[3*p] || IntegerQ[4*p]))

Rubi steps

\begin {align*} \int (a+b x)^2 \left (a^2-b^2 x^2\right )^p \, dx &=\left (a (a-b x)^{-1-p} \left (1+\frac {b x}{a}\right )^{-1-p} \left (a^2-b^2 x^2\right )^{1+p}\right ) \int (a-b x)^p \left (1+\frac {b x}{a}\right )^{2+p} \, dx\\ &=-\frac {2^{2+p} a \left (1+\frac {b x}{a}\right )^{-1-p} \left (a^2-b^2 x^2\right )^{1+p} \, _2F_1\left (-2-p,1+p;2+p;\frac {a-b x}{2 a}\right )}{b (1+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(134\) vs. \(2(60)=120\).
time = 0.21, size = 134, normalized size = 2.23 \begin {gather*} \frac {\left (a^2-b^2 x^2\right )^p \left (1-\frac {b^2 x^2}{a^2}\right )^{-p} \left (-3 a \left (a^2-b^2 x^2\right ) \left (1-\frac {b^2 x^2}{a^2}\right )^p+3 a^2 b (1+p) x \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};\frac {b^2 x^2}{a^2}\right )+b^3 (1+p) x^3 \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};\frac {b^2 x^2}{a^2}\right )\right )}{3 b (1+p)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^2*(a^2 - b^2*x^2)^p,x]

[Out]

((a^2 - b^2*x^2)^p*(-3*a*(a^2 - b^2*x^2)*(1 - (b^2*x^2)/a^2)^p + 3*a^2*b*(1 + p)*x*Hypergeometric2F1[1/2, -p,
3/2, (b^2*x^2)/a^2] + b^3*(1 + p)*x^3*Hypergeometric2F1[3/2, -p, 5/2, (b^2*x^2)/a^2]))/(3*b*(1 + p)*(1 - (b^2*
x^2)/a^2)^p)

________________________________________________________________________________________

Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \left (b x +a \right )^{2} \left (-b^{2} x^{2}+a^{2}\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2*(-b^2*x^2+a^2)^p,x)

[Out]

int((b*x+a)^2*(-b^2*x^2+a^2)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(-b^2*x^2+a^2)^p,x, algorithm="maxima")

[Out]

integrate((b*x + a)^2*(-b^2*x^2 + a^2)^p, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(-b^2*x^2+a^2)^p,x, algorithm="fricas")

[Out]

integral((b^2*x^2 + 2*a*b*x + a^2)*(-b^2*x^2 + a^2)^p, x)

________________________________________________________________________________________

Sympy [A]
time = 1.79, size = 124, normalized size = 2.07 \begin {gather*} a^{2} a^{2 p} x {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - p \\ \frac {3}{2} \end {matrix}\middle | {\frac {b^{2} x^{2} e^{2 i \pi }}{a^{2}}} \right )} + 2 a b \left (\begin {cases} \frac {x^{2} \left (a^{2}\right )^{p}}{2} & \text {for}\: b^{2} = 0 \\- \frac {\begin {cases} \frac {\left (a^{2} - b^{2} x^{2}\right )^{p + 1}}{p + 1} & \text {for}\: p \neq -1 \\\log {\left (a^{2} - b^{2} x^{2} \right )} & \text {otherwise} \end {cases}}{2 b^{2}} & \text {otherwise} \end {cases}\right ) + \frac {a^{2 p} b^{2} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - p \\ \frac {5}{2} \end {matrix}\middle | {\frac {b^{2} x^{2} e^{2 i \pi }}{a^{2}}} \right )}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2*(-b**2*x**2+a**2)**p,x)

[Out]

a**2*a**(2*p)*x*hyper((1/2, -p), (3/2,), b**2*x**2*exp_polar(2*I*pi)/a**2) + 2*a*b*Piecewise((x**2*(a**2)**p/2
, Eq(b**2, 0)), (-Piecewise(((a**2 - b**2*x**2)**(p + 1)/(p + 1), Ne(p, -1)), (log(a**2 - b**2*x**2), True))/(
2*b**2), True)) + a**(2*p)*b**2*x**3*hyper((3/2, -p), (5/2,), b**2*x**2*exp_polar(2*I*pi)/a**2)/3

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(-b^2*x^2+a^2)^p,x, algorithm="giac")

[Out]

integrate((b*x + a)^2*(-b^2*x^2 + a^2)^p, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (a^2-b^2\,x^2\right )}^p\,{\left (a+b\,x\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a^2 - b^2*x^2)^p*(a + b*x)^2,x)

[Out]

int((a^2 - b^2*x^2)^p*(a + b*x)^2, x)

________________________________________________________________________________________